#include<stdio.h>
double fact (int n);
int main (void)
{
	int i,n;
	double sum;
	sum = 0;
	scanf("%d",&n);
	
	for (i=1;i<=n;i++)
	    sum = sum + fact(i);
	    
    printf("sum=%.6f\n",sum);
	
	return 0;	    
}

double fact (int n)
{
	int i;
	double result;
	
	result = 1;
	for (i=1;i<=n;i++)
	    result = result * i;
	    
	return result;    
}
